import { http, httpMock } from "@/utils/http";

export type CategoryList = CategoryItem[];
export interface CategoryItem {
  categoryId: number;
  categoryName: string;
  categoryChild: CategoryList;
}

export const getHomeCategoryListApi = async () => {
  return http.get<CategoryList>("/product/getBaseCategoryList");
};

export type BannerList = BannerItem[];
export interface BannerItem {
  id: string;
  imgUrl: string;
}

export const getHomeBannerListApi = async () => {
  return httpMock.get<BannerList>("/banner");
};
